<!DOCTYPE html>
<html>
	<head>
		<script src="jquery.js"></script>
		<script src="overFlow.js"></script>
		<script src="common.js"></script>
		<script src="lineOper.js"></script>
		<script src="rectOper.js"></script>
		
		<script type="text/javascript" >
			$(document).ready(function(){
				var a = new MyCanvas('main') ;
				try{
					a.paint() ;
				}catch(e){alert(e.message)}
				$("#type").bind("click",function(){
					a.setMode($(this).val()) ;
				}) ;
			}) ;
		</script>
	</head>
	<body>
		<div>
			
		</div>
		<canvas id='main' style="border: 1px solid #ff0000;margin-left: 300px" width="800" height="600">
		</canvas>
		<div id='console'>
			<select id="type">
				<option value="line">line</option>
				<option value="rect">rectangle</option>
			</select>
		</div>
	</body>	
</html>